﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace BTv2.UserControls
{
    /// <summary>
    /// Interaction logic for MainAdminMenu.xaml
    /// </summary>
    public partial class MainAdminMenu : UserControl
    {
        private Settings _AdminSettings;

        public MainAdminMenu()
        {
            InitializeComponent();
        }

        public MainAdminMenu(Settings s)
        {
            InitializeComponent();
            _AdminSettings = s;
        }

        public void AdminSettingsBackButton(object sender, RoutedEventArgs e)
        {
            _AdminSettings.OpenMainSettings();
        }



        private void AdminMenuloaded(object sender, RoutedEventArgs e)
        {
            if (_AdminSettings != null)
            {
               // UsersButton.Click += _AdminSettings.UsersClicked;
               // MailingListButton.Click += _AdminSettings.MailListsCLicked;
              //  DatabseButton.Click += _AdminSettings.DatabaseClicked;
            }
            else
            {

            }
        }

        private void AdminSettingRightClick(object sender, MouseButtonEventArgs e)
        {
            AdminSettingsMenu.IsOpen = !AdminSettingsMenu.IsOpen;
        }

        private void OpenDatabaseSettings(object sender, RoutedEventArgs e)
        {
            _AdminSettings.OpenDatabaseSettings();
        }
        private void OpenMailingListSettings(object sender, RoutedEventArgs e)
        {
            _AdminSettings.OpenMailingListSettings();
        }
        private void OpenUserSettings(object sender, RoutedEventArgs e)
        {
            _AdminSettings.OpenUserSettings();
        }
    }
}
